package ca.uvic.cs.cogz.mapping.core;

import java.util.Collection;

import ca.uvic.cs.cogz.mapping.core.MappingTypeManager.MappingType;
import edu.stanford.smi.protege.model.Frame;
import edu.stanford.smi.protegex.prompt.operation.Operation;

public class MappingUtil {
	public static AbstractMapElement createMappingElement(Operation operation, MappingType mappingType, Collection<Frame> sourcePath, Collection<Frame> targetPath, String annotation) {
		if (mappingType == MappingType.VERIFIED_MAPPING) {
			return new VerifiedMapElement(sourcePath, targetPath, annotation);
		} else if (mappingType == MappingType.TEMPORARY_MAPPING) {
			return new TemporaryMapElement(operation, sourcePath, targetPath, annotation);
		} else if (mappingType == MappingType.CANDIDATE_MAPPING) {
			return new CandidateMapElement(operation, sourcePath, targetPath, annotation);
		}
		return null;
	}
}
